package chapte09;
class Student02{
    private String name;
    private int age;
    public Student02(){
        System.out.println("实例化了一个新的Student对象");
    }
    public Student02 (String name,int age){
        this(); //调用无参的构造方法
        this.name =name;
        this.age = age;
    }
    public String read(){
        return "我是:"+name+",年龄:"+age;
    }
}
public class example11 {
    public static void main(String[] args) {
        Student02 stu = new Student02("张三",18); //实例化 Student对象
        System.out.println(stu.read());
    }
}
